import request from "@/utils/request";

export function listUser(params) {
  return request({
    url: "/user",
    method: "get",
    params,
  });
}

export function listPageUser(params) {
  return request({
    url: "/user/page",
    method: "get",
    params,
  });
}

export function saveUser(params) {
  return request({
    url: "/user",
    method: "post",
    data: params,
  });
}

export function updateUser(id,params) {
  return request({
    url: `/user/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteUser(id) {
  return request({
    url: `/user/${id}`,
    method: "delete",
  });
}

export function deleteBatchUser(idList) {
  return request({
    url: `/user/batch`,
    method: "delete",
    data: idList,
  });
}

export function getUserById(id) {
  return request({
    url: `/user/${id}`,
    method: "get",
  });
}

export function examine(id) {
  return request({
    url: `/user/examine/${id}`,
    method: "put",
  });
}
